package com.ruoyi.volunteer.field.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.volunteer.field.mapper.VoluntaryFieldMapper;
import com.ruoyi.volunteer.field.domain.VoluntaryField;
import com.ruoyi.volunteer.field.service.IVoluntaryFieldService;

/**
 * 服务领域Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-08
 */
@Service
public class VoluntaryFieldServiceImpl implements IVoluntaryFieldService 
{
    @Autowired
    private VoluntaryFieldMapper voluntaryFieldMapper;

    /**
     * 查询服务领域
     * 
     * @param id 服务领域主键
     * @return 服务领域
     */
    @Override
    public VoluntaryField selectVoluntaryFieldById(Long id)
    {
        return voluntaryFieldMapper.selectVoluntaryFieldById(id);
    }

    /**
     * 查询服务领域列表
     * 
     * @param voluntaryField 服务领域
     * @return 服务领域
     */
    @Override
    public List<VoluntaryField> selectVoluntaryFieldList(VoluntaryField voluntaryField)
    {
        return voluntaryFieldMapper.selectVoluntaryFieldList(voluntaryField);
    }

    /**
     * 新增服务领域
     * 
     * @param voluntaryField 服务领域
     * @return 结果
     */
    @Override
    public int insertVoluntaryField(VoluntaryField voluntaryField)
    {
        return voluntaryFieldMapper.insertVoluntaryField(voluntaryField);
    }

    /**
     * 修改服务领域
     * 
     * @param voluntaryField 服务领域
     * @return 结果
     */
    @Override
    public int updateVoluntaryField(VoluntaryField voluntaryField)
    {
        return voluntaryFieldMapper.updateVoluntaryField(voluntaryField);
    }

    /**
     * 批量删除服务领域
     * 
     * @param ids 需要删除的服务领域主键
     * @return 结果
     */
    @Override
    public int deleteVoluntaryFieldByIds(Long[] ids)
    {
        return voluntaryFieldMapper.deleteVoluntaryFieldByIds(ids);
    }

    /**
     * 删除服务领域信息
     * 
     * @param id 服务领域主键
     * @return 结果
     */
    @Override
    public int deleteVoluntaryFieldById(Long id)
    {
        return voluntaryFieldMapper.deleteVoluntaryFieldById(id);
    }
}
